﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YGame.Base;

namespace YGame.Base.Part
{
	public enum PackageType
	{
		Normal,
		Task,
		Max,
	}

	public enum PackageTypeSize
	{
		Normal = 50,
		Task = 50,
	}
	public interface IPackagePart : IBasePart
	{
		int GetSize(PackageType packageType);
		int SetSize(PackageType packageType, int newSize);

		int GetGoodsCount(PackageType packageType, int goodsID = 0, GoodsFlag flag = GoodsFlag.Ignore);
		IGoods GetGoods(PackageType packageType, int pos);
		/// <summary>
		/// 添加物品到背包
		/// </summary>
		/// <param name="goods">物品对象</param>
		/// <param name="pos">存放位置，-1 就随便放</param>
		/// <returns>物品实际位置</returns>
		int AddGoods(PackageType packageType, IGoods goods, int pos);


		int RemoveGoods(PackageType packageType, IGoods goods);
		IGoods RemoveGoods(PackageType packageType, int pos);
	}
}
